Skip to content

Add generated unit test for generated customBg transport#810

Merged
dskloetc merged 3 commits into
mainfrom
kloet/generate-custombg-unit-test
Jun 5, 2026
Merged

Add generated unit test for generated customBg transport#810
dskloetc merged 3 commits into
mainfrom
kloet/generate-custombg-unit-test

Conversation

@dskloetc
Copy link
Copy Markdown
Contributor

@dskloetc dskloetc commented Jun 4, 2026

Follow-up to #784 and #788

Description

When generating a new EA with yarn new, it includes an integration test but only unit tests for http and ws transports.
This PR adds a unit test for customBg transports.

Changes

  1. In the generated CustomBg transport file:
    1. Use the name of the endpoint in the transport name, is we usually do manually.
    2. Initialize config and endpointName.
    3. Add logic to use the requester.
  2. Add a customBg unit test template.
  3. Use the template to generate the unit test.
  4. Update the integration test to match the new logic in the generated transport.

Testing

  1. We have a workflow that generates an adapter that still passes.
  2. I manually tested it in external-adapters-js to create an adapter with a single endpoint called abc-def with a single customBg transport. The generated tests passed.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

NPM Publishing labels 🏷️

🔵 This PR has the none label set and it will not cause a version bump.

@dskloetc dskloetc added the patch label Jun 4, 2026
@dskloetc dskloetc changed the title Add generate unit test for generated customBg transport Add generated unit test for generated customBg transport Jun 4, 2026
@dskloetc dskloetc marked this pull request as ready for review June 4, 2026 11:23
@dskloetc dskloetc requested a review from a team as a code owner June 4, 2026 11:23
Comment thread scripts/generator-adapter/generators/app/templates/test/unit/custombg.test.ts.ejs Outdated
mmcallister-cll
mmcallister-cll previously approved these changes Jun 4, 2026
Copy link
Copy Markdown
Contributor

@mmcallister-cll mmcallister-cll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple nits but looks fine

@dskloetc dskloetc added none and removed patch labels Jun 5, 2026
@dskloetc dskloetc enabled auto-merge (squash) June 5, 2026 15:13
@dskloetc dskloetc merged commit 51f5691 into main Jun 5, 2026
15 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

🚀 Successfully created version bump PR: #813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants